package org.app;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class MyUtils {
	
	public static void show(Map map){
		System.out.println(map.size());
		Set<Entry> set=map.entrySet();
		for(Entry entry:set){
			System.out.println(entry.getKey()+":"+entry.getValue());
		}
	}
	
	public static void show(int[][] number){
		for(int i=0;i<number.length;i++){
			for(int j=0;j<number[i].length;j++){
				System.out.print(number[i][j]);
			}
			System.out.println("");
		}
	}
	
	public static void show(Object[][] obj){
		for(int i=0;i<obj.length;i++){
			for(int j=0;j<obj[i].length;j++){
				System.out.print(obj[i][j]+"\t");
			}
			System.out.println("");
		}
	}
	
	public static void show(List list){
		int size=list.size();
		for(int i=0;i<size;i++){
			System.out.println(list.get(i));
		}
	}
	
	
	////
	public  static void save(String temp,File file){
		try {
			BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file)));
			bw.write(temp);
			bw.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
